package com.rhtchr.angelbaby.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 文章段落。一个段落包含一个段落标题，段落内容。
 * 
 * @author limingju
 * 
 */
@Entity
@Table(name = "t_paragraph")
public class Paragraph {

	private int id;
	// 所属文章唯一标识
	private int articleId;
	// 段落标题
	private String title;
	// 段落内容
	private String context;

	public Paragraph() {
		super();
	}

	@Column(name = "article_id")
	public int getArticleId() {
		return articleId;
	}

	@Column(name = "context", length = 4096)
	public String getContext() {
		return context;
	}

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "id")
	public int getId() {
		return id;
	}

	@Column(name = "title", length = 1024, nullable = false)
	public String getTitle() {
		return title;
	}

	public void setArticleId(int articleId) {
		this.articleId = articleId;
	}

	public void setContext(String context) {
		this.context = context;
	}

	public void setId(int id) {
		this.id = id;
	}

	public void setTitle(String title) {
		this.title = title;
	}

}
